package org.kingtop.mybatis.persistence.metamodel;

import java.io.Serializable;
import java.util.List;

import org.kingtop.mybatis.kengen.KeyGeneratorEnum;

/**
 * 用于记录PO类的信息
 *
 * @author 陈金波
 * @date 2018年1月4日 下午3:31:18
 * @Copyright: 2018 kingtop.
 */
public class TableInfo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1690639008244001532L;

	/**
	 * 表名称
	 */
	private String tableName;

	/**
	 * 表名的前缀
	 */
	private String tableNamePrefix;

	/**
	 * 表主键ID
	 */
	private TableField pkField;

	/**
	 * 表主键的自增方式
	 */
	private KeyGeneratorEnum pkKey;

	/**
	 * 除主键外的所有字段
	 */
	private List<TableField> fieldList;

	/**
	 * @return the tableName
	 */
	public String getTableName() {
		return tableName;
	}

	/**
	 * @param tableName
	 *            the tableName to set
	 */
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	/**
	 * @return the pkField
	 */
	public TableField getPkField() {
		return pkField;
	}

	/**
	 * @param pkField
	 *            the pkField to set
	 */
	public void setPkField(TableField pkField) {
		this.pkField = pkField;
	}

	/**
	 * @return the pkKey
	 */
	public KeyGeneratorEnum getPkKey() {
		return pkKey;
	}

	/**
	 * @param pkKey
	 *            the pkKey to set
	 */
	public void setPkKey(KeyGeneratorEnum pkKey) {
		this.pkKey = pkKey;
	}

	/**
	 * @return the fieldList
	 */
	public List<TableField> getFieldList() {
		return fieldList;
	}

	/**
	 * @param fieldList
	 *            the fieldList to set
	 */
	public void setFieldList(List<TableField> fieldList) {
		this.fieldList = fieldList;
	}

	public String getTableNamePrefix() {
		return tableNamePrefix;
	}

	public void setTableNamePrefix(String tableNamePrefix) {
		this.tableNamePrefix = tableNamePrefix;
	}

}
